<template>
	<view class="p-t-10">
		<view class="modelBox flex_b" style="border-radius: 10rpx;" @click="$util.redirectTo('/otherpages/edit/editPlone')">
			<view class="">更改绑定手机号</view>
			<view class="flex">
				<view class="grey m-r-20">+86 {{userInfo.mobile||'未绑定'}}</view>
				<view class="iconfont icon-xiangyoujiantou" style="font-size: 24rpx;"></view>
			</view>
		</view>
		
		<view class="modelBox flex_b" style="border-radius: 10rpx;" @click="$util.redirectTo('/otherpages/edit/cancel')">
			<view class="">注销账号</view>
				<view class="iconfont icon-xiangyoujiantou" style="font-size: 24rpx;"></view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo:{}
			};
		},
		onLoad() {
			this.getUserInfo()
		},
		methods:{
			// 获取用户信息
			getUserInfo() {
				this.$api.sendRequest({
					url: '/api/user/userInfo',
					success: res => {
						this.userInfo = res.data
						uni.$chat_userID = res.data.mobile
						uni.setStorageSync('userId', res.data.mobile);
					}
				})
			},
		}
	}
</script>

<style lang="scss">

</style>
